<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Netkk.Models.NewsModel>" %>
<%@ Import Namespace="Netkk.Core"%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>News erstellen - .NET-Stammtisch Konstanz-Kreuzlingen</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        News erstellen</h1>
    <%= Html.ValidationSummary() %>
    <% using (Html.BeginForm("Create", "News", FormMethod.Post, new Dictionary<string, object> { { "name", "mainform" } }))
       {%>
    <dl class="forms">
        <dt>
            <label for="Title">
                Titel:</label></dt>
        <dd>
            <%= Html.TextBox("Title") %>
            <%= Html.ValidationMessage("Title", "*") %>
        </dd>
        <dt>
            <label for="Date">
                Datum:</label></dt>
        <dd>
            <%= Html.TextBox("Date") %>
            <%= Html.ValidationMessage("Date", "*") %>
        </dd>
        <dt class="ta">
            <label for="Teaser">
                Kurzbeschreibung:</label></dt>
        <dd class="ta">
            <%= Html.TextArea("Teaser")%>
            <%= Html.ValidationMessage("Teaser", "*") %>
        </dd>
        <dt class="ta">
            <label for="Text">
                Text:</label></dt>
        <dd class="ta">
            <%= Html.TextArea("Text")%>
            <%= Html.ValidationMessage("Text", "*")%>
        </dd>
        <dt></dt>
        <dd>
            <a href="javascript:void(0);" onclick="document.forms['mainform'].submit();" class="save button"><span>Speichern</span></a>
            <a href="<%=Html.Action("News","News") %>" class="cancel button"><span>Abbrechen</span></a>
        </dd>
    </dl>
    <% } %>
    <script type="text/javascript">
        $(document).ready(function()
        {
            $('#Teaser').wysiwyg();
            $('#Text').wysiwyg();
        });
    </script>
</asp:Content>
